#pragma ident "$Id: XY. CAO 2017-08-15 $"

/**
* @file CorrectBiasWL.hpp
* Class to correct observables with satellite upds.
* 
*/

#ifndef GPSTK_CorrectBiasWL_HPP
#define GPSTK_CorrectBiasWL_HPP

//============================================================================
//
//  Shoujian Zhang - Wuhan University. 2011, 2012
//
//============================================================================

#include <string>
#include "ProcessingClass.hpp"
#include "PhaseBiasStore.hpp"

namespace gpstk
{

   using namespace std;

   class CorrectBiasWL : public ProcessingClass
   {
   public:



         /// Default constructor
      CorrectBiasWL() 
          : pBiasStore(NULL)
      { setIndex(); };


         /** Common constructor
          *
          * @warning If filename is not given, this class will look for a
          * file named "PRN_GPS" in the current directory.
          */
      CorrectBiasWL( PhaseBiasStore& updStore )
         : pBiasStore(&updStore)
      { setIndex(); };

      CorrectBiasWL& setBiasStore(PhaseBiasStore& biasStore)
      {
          pBiasStore = &biasStore;
          return (*this);
      };


         /** Returns a satTypeValueMap object, adding the new data generated
          *  when calling this object.
          *
          * @param time      Epoch corresponding to the data.
          * @param gData     Data object holding the data.
          */
      virtual satTypeValueMap& Process( const CommonTime& time,
                                        satTypeValueMap& gData )
         noexcept(false);


         /** Returns a gnnsRinex object, adding the new data generated
          *  when calling this object.
          *
          * @param gData    Data object holding the data.
          */
      virtual gnssRinex& Process(gnssRinex& gData)
         noexcept(false)
      { Process(gData.header.epoch, gData.body); return gData; };

   
         /// Returns an index identifying this object.
      virtual int getIndex() const;


         /// Returns a string identifying this object.
      virtual std::string getClassName() const;


         /// Default deconstructor
      virtual ~CorrectBiasWL(){};


   protected:

         /// Class to read satellite upds
      PhaseBiasStore* pBiasStore;
         
      
   private:

         /// Initial index assigned to this class.
      static int classIndex;

         /// Index belonging to this object.
      int index;

         /// Sets the index and increment classIndex.
      void setIndex(void)
      { index = classIndex++; };


   }; // End of class 'CorrectBiasWL'

      //@}

}  // End of namespace gpstk

#endif   // GPSTK_CorrectBiasWL_HPP

